home *** CD-ROM | disk | FTP | other *** search
- Path: news.connect.net!usenet
- From: tomw@intelligraphics.com
- Newsgroups: comp.lang.c++
- Subject: Re: Can anyone explain ?
- Date: 11 Feb 1996 22:43:41 GMT
- Organization: Connection Technologies
- Message-ID: <4flret$a9m@dallas1.connect.net>
- References: <823907577.10880@le-vamp.demon.co.uk>
- Reply-To: tomw@intelligraphics.com
- NNTP-Posting-Host: igxtest.intelligraphics.com
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <823907577.10880@le-vamp.demon.co.uk>, Kurt@le-vamp.demon.co.uk (Kurt Frary) writes:
- >
- >B) What the difference between
- > Regs.w.ax - I have only a guess that this will load ax with
- >whatever 32 bit code, or am I being a lamer ?
- >and Regs.h.bl - Load bl with whatever 16 bit ?
- >
- >C) How do i know how many parameters to pass to int386x ? i.e. Sregs,
- >regs e.t.c.
-
- You're missing the difference between 8-bit, 16-bit, and 32-bit registers.
- ah and al are 8-bit; ax is 16-bit, and eax is 32-bit. Read any decent
- assembly book for more. I don't know what your meaning in C) is. The
- usage is right there; it takes an integer interrupt number, a pointer to
- the input registers, a pointer to output registers, and a pointer to segment
- registers.
-
- >static struct rminfo {
- > long EDI;
- > long ESI;
-
- These are all 32-bit registers being declared here.
-
- >void scrmode(char scrmode)
- >{
- > union REGS regs;
- > struct SREGS sregs;
- > int interrupt_no=0x31;
-
- Regs is real-mode (i.e., 16-bit and 8-bit access). You'll probably find the
- definition of REGS and SREGS in <dos.h>.
-
- +---------------------------------------------------------------------------+
- + Tom Wheeler | Member NRA, NMRA +
- + tomw@intelligraphics.com | OS/2 user, C++ programmer +
- + ------------------------------------------------------------------------- +
- + Postmodernism is the refusal to think. Deconstructionism is the refusal +
- + to believe that anyone else can either. +
- +---------------------------------------------------------------------------+
- + Use or reproduction of this document or the author's email address for +
- + commercial purposes without the author's permission is prohibited. +
- +---------------------------------------------------------------------------+
-
-